{% load static %}
<!DOCTYPE html>
<html lang="en">

<head>
    <title>IBLOG-Login</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="{% static 'css/button.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/footer.css' %}">
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <script src="{% static 'js/button.js' %}"></script>
    <meta name="baidu-site-verification" content="code-fGhvmsNKDv"/>

</head>

<body>

<div class="container" style="margin-top:15px">
    <ul class="nav justify-content-end">
        <li class="nav-item">
            <a class="nav-link" href="{% url 'bloguser:user_register' %}">注册</a>
        </li>
    </ul>
</div>


<div class="container">
    <div class="container" style="margin-top:100px">
        <div class="row">
            <div class="col-sm"></div>
            <div class="col-sm">
                <div class="card card-primary">
                    <div class="card-header">
                        <h4>欢迎登录爱博客</h4>
                    </div>

                    <div class="card-body">
                        <form method="POST" action="{% url 'bloguser:user_login' %}" class="needs-validation">
                            {% csrf_token %}
                            <div class="form-group">
                                <label for="username">用户名</label>
                                <input id="username" type="username" class="form-control" name="username"
                                       tabindex="1" required autofocus>
                                <div class="invalid-feedback">
                                    Please fill in your username
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="password" class="d-block">密码
                                    <div class="float-right">
                                        <a href="#">
                                            Forgot Password?
                                        </a>
                                    </div>
                                </label>
                                <input id="password" type="password" class="form-control" name="password"
                                       tabindex="2" required>
                                <div class="invalid-feedback">
                                    please fill in your password
                                </div>
                            </div>

                            <div class="form-group">
                                <button type="submit" class="btn btn-primary btn-block" tabindex="4">
                                    登录
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="col-sm">{{ msg }}</div>
        </div>
        <br>
    </div>
</div>

<footer id="footer">
    <div class="container">
        <hr style="margin: 0;">
    </div>
    <nav class="navbar navbar-light mb-0" id="nav-footer" style="background-color: white">

        <div class="row col-12 justify-content-center font-size-xs">
            <div style="text-align: center; color: black;">
                <div class="mb-0">
                    <div id="show_time0">
                        <script>
                            setInterval("show_time0.innerHTML='CopyRight © 2019 ~'+new Date().getFullYear();", 1000);
                        </script>
                    </div>
                    ZXY iblog
                </div>
                <p class="mb-0">Powered by
                    <span class="mb-0">&nbsp;<a href="https://beian.miit.gov.cn/">豫ICP备20007445号</a></span>
                </p>
            </div>
        </div>
        </div>
    </nav>
</footer>

</body>

</html>

